package fun.symtable.system.log;

import fun.parser.EvaluationException;
import fun.symtable.SymbolTable;
import fun.symtable.system.UnaryFuntion;

public class log2 extends UnaryFuntion {
	public log2() {
		super("log2");
	}

	private static final double LOG_10_2 = Math.log10(2.0D);

	public double getValue(SymbolTable symtable) throws EvaluationException {
		return Math.log10(this.getArgumentValue(symtable)) / LOG_10_2;
	}
}
